package com.example.radiationarea.item;

import com.example.radiationarea.RadiationAreaMod;
import com.example.radiationarea.block.ModBlocks;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

/**
 * \u7269\u54C1\u6CE8\u518C\u7C7B
 */
public class ModItems {
    // Create item registry
    public static final DeferredRegister<Item> ITEMS = 
            DeferredRegister.create(ForgeRegistries.ITEMS, RadiationAreaMod.MOD_ID);

    // Register contaminated dirt item
    public static final RegistryObject<Item> CONTAMINATED_DIRT = ITEMS.register("contaminated_dirt",
            () -> new BlockItem(ModBlocks.CONTAMINATED_DIRT.get(), 
                    new Item.Properties().tab(RadiationAreaMod.RADIATION_TAB)));
                    
    // Register radiation icon item for creative tab (not shown in creative inventory)
    public static final RegistryObject<Item> RADIATION_ICON = ITEMS.register("radiation_icon",
            () -> new Item(new Item.Properties())); // No tab assignment means it won't appear in creative inventory

    // Registration method
    public static void register(IEventBus eventBus) {
        ITEMS.register(eventBus);
    }
}